//
//  LLGEmoticonCollectionViewCell.swift
//  Weibo30LLG
//
//  Created by 李龙 on 16/8/18.
//  Copyright © 2016年 lilong. All rights reserved.
//

import UIKit

//自定义表情cell
class LLGEmoticonCollectionViewCell: UICollectionViewCell {
    
    //显示cell信息
    private lazy var messageLabel: UILabel = {
    
        let label = UILabel(fontSize: 20, color: UIColor.blackColor())
        
        return label
    }()
    
    var indexPath: NSIndexPath? {
        didSet {
        
            guard let index = indexPath else {
                return
            }
            messageLabel.text = "当前显示第\(index.section + 1)组第\(index.item + 1)页"
        }
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        setupUI()
    }
    

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    // MARK: --添加控件,设置约束
    private func setupUI() {
    
        contentView.addSubview(messageLabel)
        
        messageLabel.snp_makeConstraints { (make) -> Void in
            make.center.equalTo(contentView)
        }
    }
}
